package org.cangku.dao;

import org.apache.ibatis.annotations.Param;
import org.cangku.entity.Supplier;

import java.util.List;

public interface SupplierDao {

    public List<Supplier> getIdAndName();

    /*分页加模糊查询*/
    public List<Supplier> query(@Param("contacts") String contacts, @Param("address") String address, @Param("offset") int offset, @Param("limit") int limit);

    /*根据条件获得数量*/
    public int getQueryCount(@Param("contacts") String contacts,@Param("address") String address);

    /*添加*/
    /*@Param("name") String name,@Param("contacts")String contacts,@Param("phone")String phone,@Param("address")String address,@Param("remarks")String remarks*/
    public boolean InsertInfo(Supplier supplier);

    /*修改*/
    public boolean Update(Supplier supplier);

    /*删除*/
    public boolean delete(@Param("id") int id);
}
